﻿//--------------------------------------------------------------------------
// 
//  Copyright (c) Chili Software.  All rights reserved. 
// 
//  File: TimestampNotFoundException.cs
//
//  Description: Thrown if the persistent has no timestamp attribute.
// 
//--------------------------------------------------------------------------

using System;
using System.Runtime.Serialization;

namespace Chili.Opf3.Concurrency.TimeStamp
{
	/// <summary>
	/// Exception is thrown if the persistent does not contain a member with the 
	/// <see cref="TimeStampAttribute">TimeStampAttribute</see> set.
	/// </summary>
	/// <remarks>
	/// This exception is thrown if the persistent does not contain a member with the 
	/// <see cref="TimeStampAttribute">TimeStampAttribute</see> set. When working with the 
	/// <see cref="TimeStampConcurrencyManager">TimeStampConcurrencyManager</see> every persistent
	/// needs to have one <see cref="TimeStampAttribute">TimeStampAttribute</see> set on one of the 
	/// bound properties.
	/// </remarks>
	[Serializable]
	public sealed class TimeStampNotFoundException : Exception
	{
		/// <summary>
		/// Creates a new instance of the <see cref="TimeStampNotFoundException">TimeStampNotFoundException Class</see>.
		/// </summary>
		private TimeStampNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context)
		{
		}

		/// <summary>
		/// Creates a new instance of the <see cref="TimeStampNotFoundException">TimeStampNotFoundException Class</see>.
		/// </summary>
		public TimeStampNotFoundException()
		{ 
		}

		/// <summary>
		/// Creates a new instance of the <see cref="TimeStampNotFoundException">TimeStampNotFoundException Class</see>.
		/// </summary>
		/// <param name="message">A message that describes the current exception.</param>
		public TimeStampNotFoundException(string message) : base(message)
		{ 
		}

		/// <summary>
		/// Creates a new instance of the <see cref="TimeStampNotFoundException">TimeStampNotFoundException Class</see>.
		/// </summary>
		/// <param name="message">A message that describes the current exception.</param>
		/// <param name="inner">The exception that caused the current exception.</param>
		public TimeStampNotFoundException(string message, Exception inner) : base(message, inner)
		{
		}
	}
}
